package com.blb.search_service.feign;

import com.blb.search_service.entity.JsonResult;
import com.blb.search_service.entity.PageResult;
import com.blb.search_service.entity.Spu;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient("goods-service")
public interface GoodsFeign {

    @GetMapping("/spu/page/{page}")
    JsonResult<PageResult<Spu>> page(@PathVariable("page")Integer page);

    @GetMapping("/spu/{spuId}")
    JsonResult<Spu> findSpuById(@PathVariable("spuId")Long spuId);
}
